export default {
   namespaced:true,
   state:{
       users:[]
   },
   mutations:{
        load(state,payload){
         state.users = payload
        }
   },
   actions:{
      load:async ({commit}) =>{
          const response = await fetch("https://www.fastmock.site/mock/a9b15cd4db90d4e03ed76cd3c76d9197/f6/users")
          const responseJson = await response.json()
          console.log(responseJson)
          commit("load",responseJson.data.users)
      }
   },
   getters:{
      filters:state =>(state.users)
   }

}